import { defineStore } from "pinia";


export const useUserInfoStore = defineStore('UserInfoStore',{
  state:()=>{
     return {
         userInfo:{}
     }
  },
  actions:{
    setInfo(userInfo){
      this.userInfo = userInfo;
      console.log(this.userInfo)
      localStorage.setItem('userInfo',JSON.stringify(userInfo))
    },

    getInfo(){
      return this.userInfo;
    }
  }
})
